import React,{Component} from 'react';
import Adaptive from '../../component/adaptive/Adaptive';
import Navigation from '../../component/navigation/Navigation';
import PropTypes from 'prop-types';
import './header.less';
const prefix = 'best-header';
class Header extends Component{
    render(){
        let props = this.props;
        return(
            <div style={{overflow:"hidden"}}>
                <Navigation refName={props.refName} childNodes={props.childNodes}/>
                {
                    props.choseImgDisplay?null:(props.mobileImg?<Adaptive desktop={
                            <div className={prefix + '-imgContainer'}>
                                <img src={props.imgUrl} alt=""/>
                            </div>
                        } phone={
                            <div className={prefix + '-imgContainer'}>
                                <img src={props.mobileImg} alt=""/>
                            </div>
                        } size={1200}/>:
                    <div className={prefix + '-imgContainer'}>
                        <img src={props.imgUrl} alt=""/>
                    </div>)
                }
            </div>
        )
    }
};
export default Header;
Header.propTypes = {
    refName:PropTypes.string,
    childNodes:PropTypes.string,
    choseImgDisplay:PropTypes.string,
    imgUrl:PropTypes.any,
    mobileImg:PropTypes.any
};